#if !defined(SM__COLLIDE_H)
#define SM__COLLIDE_H

#include "SDL.h"

struct CollisionMap 
{
  unsigned char* map;
  unsigned int height;
  unsigned int width;
  unsigned int cellInPixels;
};

enum sm_cdr_result {
  sm_cdr_success = 0,
  sm_cdr_failure = 1,
  sm_cdr_partial_move = 2,
  sm_cdr_cannot_move = 3
};

// used references instead of pointers to prevent any memory leaks
// and ownership questions...
sm_cdr_result moveRectWithCdr(const CollisionMap& colMap,
                              const SDL_Rect& inPosBegin,
                              const SDL_Rect& inPosEnd,
                              SDL_Rect& outPosFinal);

#endif // SM__COLLIDE_H
